Remove support for arm64 (VALID_ARCHS) to run on M1 mac models

andrew.n

Member
@Max There is a compatibility issue with FlashPhoner SDK on M1 architecture. I still can run the project from Xcode on my iPhone, but if I try to run it on the simulator is not working anymore. (Everything works ok on my intel MacBook, the issue only happens on M1)

Code:
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios9.1'
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios9.1'
Command CompileSwift emitted errors but did not return a nonzero exit code to indicate failure
Code:
ld: warning: directory not found for option '-F/pathtoproject/Projectname/FPWCSApi2Swift.framework/Frameworks'
ld: warning: directory not found for option '-F/pathtoproject/FPWCSApi2Swift.framework/Frameworks'
ld: warning: ignoring file /Users/user/Library/Developer/Xcode/DerivedData/Projectname-bxwkikkxazzdiqegsfonrunjorom/Build/Products/Debug-iphonesimulator/FPWCSApi2Swift.framework/FPWCSApi2Swift, file is universal (i386,x86_64) but does not contain the arm64 architecture: /Users/user/Library/Developer/Xcode/DerivedData/Projectname-bxwkikkxazzdiqegsfonrunjorom/Build/Products/Debug-iphonesimulator/FPWCSApi2Swift.framework/FPWCSApi2Swift
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/pathtoproject/Frameworks/WebRTC.framework/WebRTC' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Code:
Showing All Messages
Directory not found for option '-F/pathtoproject/projectname/FPWCSApi2Swift.framework/Frameworks'
Directory not found for option '-F/pathtoproject/FPWCSApi2Swift.framework/Frameworks'
Ignoring file /Users/user/Library/Developer/Xcode/DerivedData/projectname-bxwkikkxazzdiqegsfonrunjorom/Build/Products/Debug-iphonesimulator/FPWCSApi2Swift.framework/FPWCSApi2Swift, file is universal (i386,x86_64) but does not contain the arm64 architecture: /Users/nastasiupta/Library/user/Xcode/DerivedData/projectname-bxwkikkxazzdiqegsfonrunjorom/Build/Products/Debug-iphonesimulator/FPWCSApi2Swift.framework/FPWCSApi2Swift
Building for iOS Simulator, but linking in dylib built for iOS, file '/pathtoproject/Frameworks/WebRTC.framework/WebRTC' for architecture arm64
 

Max

Administrator
Staff member
Good day.
We raised the ticket WCS-3492. Will let you know about progress in this topic.
Please also note that building for iOS Simulator is not recommended because Simulator has no access to Mac camera, and cannot be used to test stream publishing.
 

andrew.n

Member
@Max Thank you. I build on iOS Simulator when I work on other features, nothing related to FlashPhoner SDK (or any other camera access feature) :).
 

Max

Administrator
Staff member
Good day.
We investigated the issue. Unfortunately, we cannot build SDK for M1 iOS Simulator (arm64) because WebRTC library (the main dependency) cannot be build for simulator in this case.
So we recommend to launch Xcode in Rosetta to build for iOS Simulator.
 

Max

Administrator
Staff member
Unfortunately, no issues in that list are fixed yet, and none of them affects the simulator building. So, Rosetta is still the best workaround.
 

andrew.n

Member
Yeah, I agree. Once this issue is solved, maybe they will also move to Swift Package Manager.
Even GooglePlaces SDK that they provide is not on SPM yet (https://issuetracker.google.com/issues/141721633) ... They are moving so slow in this direction...
It is important for us to move on SPM because right now only FlashPhoner SDK is keeping us to continue using CocoaPods (because of the dependencies) :). (Btw, it will be useful if meanwhile, you could move the FlashPhoner SDK installation using Cocoapods).
 

Max

Administrator
Staff member
It is important for us to move on SPM because right now only FlashPhoner SDK is keeping us to continue using CocoaPods (because of the dependencies)
We use two dependencies from CocoaPods: SocketRocket and JSONModel. Both of them has no plans to move from CocoaPods to SPM. So we also have to stay with CocoaPods too.
 

andrew.n

Member
@Max what about to have the FlashPhoner SDK provided via Cocoapods instead of having to do the upgrade manually every time :)? I asked you about cocoapods integration about 1 yeah ago...
 

Max

Administrator
Staff member
Any ETA for this ?
Now we're working on WebRTC library update in ticket WCS-3485 (low publish FPS in iOS 15.4.1 and 15.5). In this ticket, we also plan to resolve an embedded frameworks issue. Then, we plan to move all our frameworks (Objective C, Swift and modified WebRTC) to Cocoapods.
 

Max

Administrator
Staff member
Good day.
We updated WebRTC library in iOS SDK build 2.6.86. Please note that latest WebRTC library does not support arm32, so since this build iOS SDK will work only on arm64 hardware (iPhone 5s and newer). Also, examples preparation for building is slightly changed, please see here: Preparing examples for building (p. 4-5).
Now, we're trying to publish to Cocoapods (ticket WCS-3499). Will let you know result here.
 

Max

Administrator
Staff member
any ETA for Cocoapods integration :) ?
The ticket depends on two other tickets WCS-3517 (removing unnecessary dependencies, testing) and WCS-3526 (converting FPWCSApi2 to xcframework, developing). May be the first decade of July.
 
Last edited:
Top