UIKit.NSUnderlineStyle single or styleSingle - swift

I am trying to upgrade my AttributedTextView library to Swift 4.2.
During this conversion I had to change NSUnderlineStyle.styleSingle to NSUnderlineStyle.single and now my project builds and runs
Now I want to publish my update, but when doing a pod lib lint I am getting the following error:
- ERROR | [iOS] xcodebuild: /Users/evermeer/Dev/GitHub/AttributedTextView/Sources/Attributer.swift:621:48: error: 'single' has been renamed to 'styleSingle'
- NOTE | [iOS] xcodebuild: UIKit.NSUnderlineStyle:15:23: note: 'single' was introduced in Swift 4.2
when I change it back to styleSingle, the pod error disappears but my project won't build.
My pod spec does contain the line
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
but setting it to any other version does not help.
any idea how to solve this?

instead of using the now deprecated pod_target_xcconfig you should use: s.swift_version = '4.2'
In my case I also had a file with the name .swift_version that contained 4.0
If you use both and they are different, then you will get a warning.

Related

Facing a problem to set up the emulator in flutter

I have the following problem.....
Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
int _counter = 0;dsggfsgfh;
^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
I'm a beginner with Flutter. How can I solve this problem?
Your code has junk words or sentences, check your line ended with dsggfsgfh; which might be added unfortunately. Just remove it this will work.
It's possible that it's a compatibility issue between flutter framework and engine. You can try and:
Upgrade flutter to the latest version
Create a new project
Copy the code from the old project in steps
If you have plugins from the old project, add them one by one as you run the emulator
(It's possible that a certain version of a plugin has a compatibility issue with flutter)

Having this stripe issue after updating Xcode ^

I updated my MacBook and now I get this issue from Xcode about my project and can run it :
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/STPPinManagementService.m:51:81:
error: 'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin
deserializer:[STPIssuingCardPin new]
^
In file included from
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/STPPinManagementService.m:11:
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/PublicHeaders/STPIssuingCardPin.h:22:
1: note: 'init' has been explicitly marked unavailable here
- (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPIssuingCardPin")));
^
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/STPPinManagementService.m:101:81:
error: 'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin
deserializer:[STPIssuingCardPin new]
^
In file included from
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/STPPinManagementService.m:11:
/Users/ralucaraluca/Downloads/tariffo/tariffo/ios/Pods/Stripe/Stripe/PublicHeaders/STPIssuingCardPin.h:22:
1: note: 'init' has been explicitly marked unavailable here
- (instancetype)init __attribute__((unavailable("You cannot directly instantiate an STPIssuingCardPin")));
^
ANY IDEA WHAT CAN I DO???
Yeah it's actually a problem caused by updating the XCode.
There are some workarounds in here. One of them is the XCode downgrade :/
Same thing happened with me, I changed my macbook and now xcode is giving this weird issue. I followed this link and updated my 'Stripe' version.
'new' is unavailable: You cannot directly instantiate an STPIssuingCardPin
This is what i followed:
comment out pod 'stripe' line
run pod install
uncomment line
run pod install

Swift build error_if_any_output_files_are_specified_they_all_must_be

When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.
<unknown>:0: error: if any output files are specified, they all must be
Command CompileSwift failed with a nonzero exit code
I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.
https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be
Does anyone know how this error is actually triggered, or what I can do to fix it?
Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.
The solution for us was to set Compilation Mode to Incremental instead of Whole Module.
This means, you have to ignore the Validate Project Settings warning:

Swift error when running pod lib lint

Swift is very new for me. I have a swift project that builds fine in xcode and all the unit tests pass.
However when I run pod lib lint I get a no such module MyModule error.
Testing with xcodebuild.
-> my-swift-project (0.4.2)
- WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- ERROR | [iOS] xcodebuild: my-swift-project/Echo/Delegates/MyModule/MyModule.swift:7:8: error: no such module 'MyModule'
The file in question has an import module declaration at the top of the file
import MyModule
Would anyone know why this would be happening and why the project builds in xcode fine but not when I get to this stage?
build settings > Framework Search Paths
Set framework search path to $(SRCROOT) and recursive.

Base SDK missing for PhoneGap-based iOS application

I have installed the PhoneGap library for iOS and created a new project, but when I run the application I get the error Base SDK missing. Why is this?
edit 1
230 errors after applying mAc reply these are some of the errors:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60:23 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:60:23: error: expected function body after function declarator
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:91 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:91: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256:86 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:256:86: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258:114 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:258:114: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187:31 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:187:31: error: unknown type name 'UIApplicationState'
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190:4 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:190:4: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191:28 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:191:28: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202:45 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:202:45: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206:4 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:206:4: error: expected a type
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82:22 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITextView.h:82:22: error: unknown type name 'UIDataDetectorTypes'
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54:22 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h:54:22: error: unknown type name 'UIDataDetectorTypes'
/Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.h:56:10 /Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.h:56:10: error: cannot find protocol declaration for 'UIPopoverControllerDelegate'; did you mean 'UITabBarControllerDelegate'?
/Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.m:24:3 /Users/Ahmed/Documents/PhoneGapLib/Classes/Camera.m:24:3: error: use of undeclared identifier 'UIUserInterfaceIdiomPhone'; did you mean 'UIUserInterfaceIdiom'?
i think you have import a project...
see select your project and go its INFO -> there in build Tab -> Architectures -> In Base SDK select Latest iOS -> save n close. Now select the simulator (by default Device is selected).
And then run the app.
Edited :-
Might be a bug in Xcode 3.2.4 or the SDK configuration.
Try placing a line like one of these in your Build Settings Preprocessor Macros:
-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100
or
-D__IPHONE_OS_VERSION_MIN_REQUIRED=030103
You can Check Here also regarding your problem.
Hope it Helps :) Adios
In the project.pbxproj file, I had to change this in a few places:
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
to
IPHONEOS_DEPLOYMENT_TARGET = 6.1;