1

I'm trying to produce an archive (IPA file) of my application made with Flutter. I'm following the official guide for that: Preparing an iOS app for release: Create a build archive.

I have a problem producing the archive when I'm using the flutter_secure_storage package.

When I try to produce the archive (Xcode -> Product -> Archive), I get the following error:

Runner: 1 issue
/Path/to/my/project/ios/Runner/GeneratedPluginRegistrant.m:6:9: 
'flutter_secure_storage/FlutterSecureStoragePlugin.h' file not found

I can compile the project (from Xcode/Visual Code or using "flutter build ios --release" command) without any issue. I only get the issue when I'm trying to generate the archive.

Do I need to change something in the project settings for creating the archive?

2
  • Did you install CocoaPods that come with the project? flutter.dev/docs/get-started/install/… Commented Sep 11, 2019 at 8:53
  • 1
    Yes. CocoaPods is installed. Found the problem. I was trying to create the archive from the Runner.xcodeproj instead of the Runner.xcworkspace (which defines the pods targets). Switching to that project succeeded to produce the archive. Commented Sep 11, 2019 at 9:12

3 Answers 3

6

The problem was that I was trying to create the archive from the Runner.xcodeproj instead of the Runner.xcworkspace (which defines the pods targets).

Switching to that project solved the issue to produce the archive.

Sign up to request clarification or add additional context in comments.

Comments

1

make sure the platform: ios version is aligned with the one in the Podfile:

Version in Target -> Runner -> General -> Deployment Info should be the same as the on in your Podfile.

Checkout this image: https://i.sstatic.net/Q6nPr.png

Comments

0

just make sure that you're opening Runner.xcworkspace and not Runner.xcodeproj

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.