Igor-Khomich / JanusAudioStreamPlayer

14 stars 4 forks source link

Could not find module 'JanusWebGate' for target 'x86_64-apple-ios-simulator'; found: arm64, arm #1

Closed sajidjutt7 closed 4 years ago

sajidjutt7 commented 4 years ago

I clone this project first. Then "JanusWebGate.framework" file was in xcode but blur. And upon checking Podfile, i come to know that pod 'JanusWebGate' is missing in podfile. so i add this line in podile. pod 'JanusWebGate'

Then hit this on terminal pod install

Got this success message

Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

After then i am getting this error

Could not find module 'JanusWebGate' for target 'x86_64-apple-ios-simulator'; found: arm64, arm

sajidjutt7 commented 4 years ago

Update:

I change JanusWebGate.Framework form "Do not Embed" to "Embed & sign" in 'Frameworks, libraries and Embedded Content' unser General in Target.

Then i am getting this error

Multiple commands produce '/Users/myUser/Library/Developer/Xcode/DerivedData/JanusAudioStreamListener-dbvxofleankdqfbwxbvxillvpwis/Build/Products/Debug-iphonesimulator/JanusAudioStreamListener.app/Frameworks/JanusWebGate.framework':

1) Target 'JanusAudioStreamListener' has copy command from '/Users/mac/Git/Sample Downloads/iOS/JanusAudioStreamPlayer/Pods/JanusWebGate/JanusWebGate.framework' to '/Users/mac/Library/Developer/Xcode/DerivedData/JanusAudioStreamListener-dbvxofleankdqfbwxbvxillvpwis/Build/Products/Debug-iphonesimulator/JanusAudioStreamListener.app/Frameworks/JanusWebGate.framework'

2) That command depends on command in Target 'JanusAudioStreamListener': script phase “[CP] Embed Pods Frameworks”

sajidjutt7 commented 4 years ago

REsolved this issue.

We have to build the custom framework again for x86_64 in XCode 11. Followed these steps and copy the framework in code. worked

1) Build YourCustomFramework target for iOS simulator and extract framework from products folder on your desktop. Xcode⁩ ▸ ⁨DerivedData⁩ ▸ ⁨Your Project ▸ ⁨Build⁩ ▸ ⁨Products⁩ ▸ ⁨Release-iphonesimulator 2) Build YourCustomFramework target for Generic iOS Device and extract framework from products folder on your desktop. Xcode⁩ ▸ ⁨DerivedData⁩ ▸ ⁨Your Project ▸ ⁨Build⁩ ▸ ⁨Products⁩ ▸ ⁨Release-iphoneos⁩ 3) Rename the simulator generated framework to YourCustomFramework-sim.framework so that it is distinguishable later. 4) Use the lipo command to combine both binaries into a single fat binary file. (cd to your desktop or wherever your custom framework file is located) $lipo -create ./YourCustomFramework-sim.framework/YourCustomFramework ./YourCustomFramework.framework/YourCustomFramework -output ./YourCustomFramework 5) Copy YourCustomFramework binary file created in above step and replace it with the binary in YourCustomFramework.framework folder. 6) From folder YourCustomFramework-sim.framework/Modules/YourCustomFramework.swiftmodule/ copy all of the modules and paste them to YourCustomFramework.framework/Modules/YourCustomFramework.swiftmodule/