SpriteKit NSTimeInterval renamed - ios

I'm trying to use SpriteKit in my project but after I install it and open the project I get 28 errors. I tried to rename the 'NSTimeInterval' to 'TimeInterval' but it didn't work. I'm using Xcode 9.3
This is my Podfile:
platform :ios, '9.0'
target 'Aaa' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Aaa
pod 'SpriteKit-Spring'
end
I get these errors (27 are the same - 'NSTimeInterval' has been renamed to 'TimeInterval'):
Error list screenshot
Solution:
In the Podfile have this line:
pod 'SpriteKit-Spring', :git => 'https://github.com/ataugeron/SpriteKit-Spring/'

SpriteKit-Spring hasn't been updated to Swift 4, at least not the released pod. See https://github.com/ataugeron/SpriteKit-Spring/issues/12 for a workaround.

Related

fatal error: module 'firebase_auth' not found #import firebase_auth

I am trying to use Firebase Authentication for my iOS Flutter.
I have tried all of the procedures laid out in this link but I still receive the same error.
https://github.com/FirebaseExtended/flutterfire/issues/1929
This is the error I receive when I run the iOS app.
/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_auth' not found
#import firebase_auth;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
This is my Podfile
# add pods for desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
end
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
You may be interested in this thread here: https://github.com/FirebaseExtended/flutterfire/issues/192
Essentially its recommendation is to delete Podfile and Podfile.lock. Once you've done this re-run and flutter should automatically create the correct Podfiles for you.
Hopefully that helps.
DB
When it happens remove the "^" on the dependency. So firebase_auth: ^1.0.0 -> firebase_auth: 1.0.0.

iOS - Add Swift pod to Objective-C project

Hello I'm working on an old Objective-C project, that has 30+ pods dependecies, all written in Objective-C.
I'm trying to add a Swift pod, this one in particular :
pod 'CSV.swift', '~> 2.4.3'
# ...
# other Objective-C pods ...
# ...
Because I would like to continue new developments in Swift.
But I cannot make it work. If I add use_frameworks!, I get an error at pod install :
The 'Pods-myProject' target has transitive dependencies that include static binaries: (/myProjectPath/Pods/ObjcPod/ObjcPod.framework)
And if I remove use_frameworks!, I get tons of compilation errors, here are some :
Undefined symbol: protocol descriptor for Swift.UnicodeCodec
Undefined symbol: dispatch thunk of Swift.UnicodeCodec.decode<A where A1: Swift.IteratorProtocol, A.CodeUnit == A1.Element>(inout A1) -> Swift.UnicodeDecodingResult
I don't know what I could try otherwise, any help would be much appreciated !
This way you can use swift pod in objective c project try this solution.
Write in your pod file
target 'YourProjectName' do
use_frameworks!
pod 'CSV.swift', '~> 2.4.3'
// Here you can add mode pod as per your requirement Like
pod 'Firebase/Core'
pod 'Fabric'
pod 'Crashlytics'
end
Then Run Pod Install.
For import write this
#import CSV;
And then you have access of your CSV pod files.

Using MapboxNavigation iOS with Xcode 10

Is there any possibility to use MapboxNavigation (version 0.21 or 0.22) iOS with Xcode 10. On its Github and CocoaPods site is stated, that it can only be used with Xcode 9, but a few issues on Github mention the (successful) use of Xcode 10 with MapboxNavigation.
However, I tried to install MapboxNavigation via CocoaPods using Xcode 10 and get a bunch of errors:
/Users/Paul_Obernolte/Library/Developer/Xcode/DerivedData/pq-app-v2-gynuaxsohvqddqegrvemywowchkr/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/Swift Compatibility Header/MapboxDirections-Swift.h:171:9: error: 'MapboxDirections/MapboxDirections.h' file not found
#import <MapboxDirections/MapboxDirections.h>
^
<unknown>:0: error: could not build Objective-C module 'MapboxDirections'
Is there any workaround to avoid this errors using Xcode 10?
Edit: Here is my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
EXPO_CPP_HEADER_DIR = 'ExpoKit'
target 'pq-app-v2' do
pod 'MapboxDirections.swift', '~> 0.23'
pod 'MapboxMobileEvents',
:git => 'https://github.com/mapbox/mapbox-events-ios.git',
:commit => "79d29f1df5a9187481f5c9ac8fa13430d1f04139"
pod 'MapboxNavigation', '~> 0.21.0'
... (more Pods)
end
I need to download MapboxMobileEvents separately because of this issue: https://github.com/mapbox/mapbox-events-ios/pull/85
target 'pq-app-v2' do
use_frameworks!
... (more Pods)
end
change code in pod file if "use_frameworks!" is commented than put it uncommented as above.

Alamofire not working (Swift/Xcode 8)

I am getting the following errors when trying to import Alamofire into my project (Cocoapods isn't working for me, so I have to manually import it).
Anyway, I'm using XCode 8 and Swift 2.3, and I'm getting these errors:
Update: I cleaned XCode, downloaded the latest version of Alamofire and restarted my computer. Now, XCode seems to be giving me conflicting errors (pictures for reference)
Thanks!
As of early September '16, you need to use the following in your Podfile:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.5.0'
Pointing to the swift2.3 branch no longer works, as that branch has been deleted. The tag '3.5.0' points to the last revision on master that supports Swift 2.3.
Use Swift 2.3 in Xcode 8
Pod file
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'ProjectName' do
pod 'Alamofire'
pod 'Contentful'
pod 'ContentfulDeliveryAPI'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
More information about Xcode 8 + Swift 2.3 support for Alamofire:
https://github.com/Alamofire/Alamofire/pull/1313
Try updating your pod to
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.5.0' (Updated)
Update: This is a good guide to follow if you're interested in keeping Xcode7 compatibility, and still be able to target iOS10/swift 2.3 for development: http://radex.io/xcode7-xcode8/

Error ITMS-90206 Invalid bundle contains disallowed file 'Frameworks'

I have a problem uploading my application into the Store via Xcode, this one in particular.
I saw a lot of post about this error, but all are talking about Extension App, that I do not use.
I'm using a Custom framework and Cocoapods.
You can see here my tree :
XXX is my project app name
SharedXXX is my custom framework
Pods is the project created by cocoa pods
Here is my cocoa podFile :
use_frameworks!
link_with 'XXX', 'SharedXXX'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
workspace 'XXX'
xcodeproj 'XXX/XXX.xcodeproj'
xcodeproj 'Shared/SharedXXX.xcodeproj'
def default_pods
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
pod "SnapKit", '~> 0.17.0'
pod "DKChainableAnimationKit", '~> 1.6.0'
pod "AsyncSwift"
end
def shared_pods
pod "Alamofire", '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift'
end
target :XXX do
xcodeproj 'XXX/XXX.xcodeproj'
default_pods
shared_pods
end
target :XXXDev do
xcodeproj 'XXX/XXX.xcodeproj'
default_pods
shared_pods
end
target :SharedXXX do
xcodeproj 'Shared/SharedXXXX.xcodeproj'
shared_pods
end
Build settings for custom framework (SharedXXX) :
I set the Embedded property to Yes
General Settings for custom framework (SharedXXX) :
The framework provided by Cocoapods is linked.
And to finish,
The General Settings to the main project (App Project : called XXX on the tree)
:
Any idea ?
I solved the problem
Firstly, set into Build Settings
For main project (here XXX) : Embedded Content Contains Swift Code to
YES
Custom Framework (SharedXXX) : Embedded Content Contains Swift Code to NO
Custom Framework (SharedXXX) : Runpath Search Path = #executable_path/../../Frameworks
This helped me solving that issue
I faced the same problem while trying to upload from Xcode 9.3
This happened because I added 'use_frameworks' in my OneSignal
NotificationServiceExtension
The value Always Embed Swift Standard Libraries found in Build Settings should be set to Yes only for you main Projects and not for your custom frameworks or extensions.

Resources