Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Missing required architecture arm64 #3

Closed
Talgat777 opened this issue Feb 1, 2022 · 12 comments · Fixed by #6
Closed

Missing required architecture arm64 #3

Talgat777 opened this issue Feb 1, 2022 · 12 comments · Fixed by #6
Assignees

Comments

@Talgat777
Copy link

Can't compile the project for IOS after importing this SDK. Error:

Command CompileSwiftSources failed with a nonzero exit code
ld: warning: ignoring file /Users//Documents/Repo//build/ios/Debug-iphonesimulator/Flurry-iOS-SDK/Flurry_iOS_SDK.framework/Flurry_iOS_SDK, missing required architecture arm64 in file /Users//Documents/Repo//build/ios/Debug-iphonesimulator/Flurry-iOS-SDK/Flurry_iOS_SDK.framework/Flurry_iOS_SDK (2 slices)
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FlurryParamBuilder", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
"OBJC_CLASS$_FlurryCCPA", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
"OBJC_CLASS$_FlurryUserProperties", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
"OBJC_CLASS$_Flurry", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
(maybe you meant: OBJC_CLASS$_FlurryFlutterPlugin)
"OBJC_CLASS$_FlurrySessionBuilder", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
"OBJC_CLASS$_FConfig", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
"OBJC_CLASS$_FlurryMessaging", referenced from:
objc-class-ref in FlurryFlutterPlugin.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@hantao-flurrydev
Copy link
Collaborator

Could you try exclude arm64 arch on App level in XCode project? as currently we are excluding arm64 for iOS simulator on sdk level.

@FlurryDevNP
Copy link
Collaborator

Here are the build settings for excluded architecture
Screen Shot 2022-02-01 at 10 45 46 AM

@jodymac
Copy link

jodymac commented Feb 10, 2022

Will the simulator be supported in the future? I can build to my device, but prefer to work in the simulator for the majority of the time and convenience

@blazer82
Copy link
Contributor

Is there a workaround to keep working with the simulator or do we need to exclude the flurry dependency entirely on the simulator?

@FlurryDevNP
Copy link
Collaborator

Hello @jodymac and @blazer82 , you can try building the app on simulators with x86_64 architecture instead of arm64.

@blazer82
Copy link
Contributor

@FlurryDevNP thanks for the suggestion. It did not work for me (or I did it wrong). Why do you need to exclude simulators anyway? I wouldn't even care if the library was disabled on simulators if it at least builds. Right now I need to maintain two branches of my code base - one with the flurry dependency in it and one without it - which isn't really sustainable in the long run.

@hantao-flurrydev
Copy link
Collaborator

@blazer82 This procedure is an accommodation for how our native iOS SDK's set up. Since M1 machine brings new simulator slice (arm64) so does XCode >=12 available archs, our iOS SDK is excluding arm64 in podspec settings in order for non M1 machine to build on simulators (simulators can still run on x86_64). So this might require users to exclude arm64 for simulator in the build settings, because by default it is available archs on xcode >=12.

@jodymac
Copy link

jodymac commented Feb 15, 2022

I was unable to get your suggestion to work as well. I was a version behind, so I upgraded to the latest. Same result. I'm on Intel, macos Big sur 11.6.3, xcode 13.2.1. Perhaps more detailed instructions as even your screenshots didn't match mine. I can deal with having to run it on my device to test, but I don't want to have a second Flurry disabled branch/flavor solely just to be able to build and test all the other aspects of the app. I use the simulator quite frequently and test multiple screen sizes before uploading to testflight.

@hantao-flurrydev
Copy link
Collaborator

@jodymac @blazer82 sorry for this issue. I was testing this and found the arm64 should be excluded for pods target as well. The built framework skipped our native sdk excluded archs, so that have to do it manually on non M1 machine
Screen Shot 2022-02-16 at 10 47 25 AM
Screen Shot 2022-02-16 at 10 47 36 AM
Screen Shot 2022-02-16 at 10 47 44 AM
Screen Shot 2022-02-16 at 10 47 51 AM
.

@blazer82
Copy link
Contributor

@hantao-flurrydev thank you! This seems to work when starting the app in Xcode. Somehow the changes on the flutter_flurry_sdk target seem to get lost when executing flutter run however. Any idea what might be the cause for this?

@blazer82
Copy link
Contributor

blazer82 commented Feb 18, 2022

@hantao-flurrydev @Talgat777 @jodymac I could fix the issue by following the steps above and manually editing the file flutter_flurry_sdk.podspec.json inside the flutter_flurry_sdk. I also created a PR to hopefully fix this permanently.

I just changed

"EXCLUDED_ARCHS[sdk=iphonesimulator*]": "i386"

to

"EXCLUDED_ARCHS[sdk=iphonesimulator*]": "i386 arm64"

@jodymac
Copy link

jodymac commented Feb 18, 2022

Thanks everybody! The above workarounds have me working like I desired. Hassle free.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants