hi it's my first time to post.
I'm now doing a tutorial on Xcode 8.2.1 playground using SQLite from below website:
https://www.raywenderlich.com/123579/sqlite-tutorial-swift
I downloaded a Xcode source containing a playground and a SQLite project, and i uploaded it to the following path.
https://github.com/TerryDon2017/My-SQLite.swift-master-tutorial.git
I have the error message below:
Playground execution failed: error: SQLite.playground:1:8: error: no
such module 'SQLite' import SQLite
^ thread #1: tid = 0x1cd7d, 0x00000001094e9360 com.apple.dt.Xcode.PlaygroundStub-macosx`executePlayground, queue =
'com.apple.main-thread', stop reason = breakpoint 1.1
I was told to do 2 things:
1.drag the SQLite.xcodeproj to the workspace
2.set the build dependency
i think I did 1 ok but for 2 i could not find anyway to set the dependency for the playground. could you please kindly help? thanks!
Related
I have a target with mixed Swift and Objective-C code. I do the following:
I put a breakpoint on a line in a Swift file part of this target.
I run this target.
I type po $someVariableName in the debugger once it hits the breakpoint.
The debugger now shows a host of errors, ending with:
error: failed to import bridging header '/path/to/Bridging-Header.h'
Couldn't initialize Swift expression evaluator due to previous errors.
The output starts with:
Error while loading Swift module:
TARGET_NAME: /path/to/Bridging-Header.h:18:9: note: in file included from /path/to/Bridging-Header.h:18:
In between are a host of nullability annotation warnings and errors about unknown type names. Some errors come from bridging headers in the Carthage builds directory:
error: /path/to/project/Carthage/Build/iOS/Some.framework/Headers/Some-Swift.h
It seems as if whatever is executing after my po statement, lacks a few header imports or executes things in the wrong order. Any clue as to what could be wrong here?
I am using Xcode 11.4 (11E146)
I added Admob Google extension in to my Game Maker 2 project, when I try to test it on xcode for iOS, I am getting the error from xcode : unable to read property list from file: ...
Tried to fiddle around with the build settings in Xcode for plist to make it XML/Binary and same as input but nothing helped.
Made sure that the extensions in game maker have IOS enabled
Tried to clean build folder
Changed Locations: of Derived data to Relative
Looked for similar problems on google and stack overflow, but nothing exactly with the same issue
Below is the code given by Gamemaker
if os_type == os_ios
{
ads_app_id = "ca-app-pub-4724502015965127~5126911475";
banner_id = "ca-app-pub-4337965814269841/5893054134";
interstitial_id = "ca-app-pub-4724502015965127/8852681295";
rewarded_id = "ca-app-pub-4724502015965127/3717109960";
}
else
{
ads_app_id = "ca-app-pub-4337965814269841~8766033395";
banner_id = "ca-app-pub-4337965814269841/5893055122";
interstitial_id = "ca-app-pub-4337965814269841/5893055258";
rewarded_id = "ca-app-pub-4337965814269841/5893055399";
}
GoogleMobileAds_Init(interstitial_id, ads_app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;
error:
unable to read property list from file:
/Users/faisalnaamani/GameMakerStudio2/iOS/GMS2IOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Supporting
Files/Pixel_Bricks_iOS-Info.plist: The operation couldn’t be
completed. (XCBUtil.PropertyListConversionError error 1.)
The error is happening at Build time
I opened the plist file with ATOM, the one generated by GameMaker Studio when I noticed xcode could not read it. I noticed a bit of code that was causing an error and when I deleted it xcode was able to build. The code is below:
<key>NSAppTransportSecurity</key>\n\r<dict>\n\r
<key>NSAllowsArbitraryLoads</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsForMedia</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsInWebContent</key>\n\r <true/>\n\r</dict>
But I am not sure how to fix it to make it look correct. I am afraid if I delete it somehow the code will not be correct. Does anyone have a solution? And how would I fix it from GameMaker.
As Faisal suggested, the file cannot be read if it's malformed.
Trying to open the file with Xcode helped me find the problem: a syntax error. Xcode was very explicit about where the error might be: at line 32.
After fixing the error in another IDE I was able to open the file with Xcode and build/run my app.
I'm trying to use playground in xcode 7 to test some code but for some reason it won't run.
This is the error I'm getting
Playground execution failed: /var/folders/q6/zswv_4wj16zbckfbdtl9lmyh0000gp/T/./lldb/11352/playground14.swift:1:8: error: module file's minimum deployment target is ios9.0 v9.0: /var/folders/q6/zswv_4wj16zbckfbdtl9lmyh0000gp/T/com.apple.dt.Xcode.pg/auxiliarymodules/C2294E15-2E60-47B3-8A0B-DABB2C0C3D88/MyPlayground_Sources.framework/Modules/MyPlayground_Sources.swiftmodule/x86_64.swiftmodule
import MyPlayground_Sources
This is the very simple code I'm trying to execute.
class testClass{
var property = "some property"
}
var test = testClass()
test.property
What does it mean by module file's minimum deployment target is ios9.0?
I think I found what the problem is.
I opened an Xcode 6 playground file in Xcode 7.
When I create a new playground in Xcode 7 it works fine.
I've just installed Xcode 6 and I've found that .. whenever I try to add an existing file to the project it produce a compilation error in the basic UIKit classes such as UITableView and NSObject ..
I have no idea why this is happening!
as per Shai and iDev answers i found that in xcode 6 there's no default PCH file .. so there's no default import for uikit and foundation .. it should be added manually .
I am using the "Debug Selected Views" feature in Xcode 6 beta 5, I set a breakpoint within my prepareForInterfaceBuilder() function.
But when I try to use the po command, it gives me an error:
(lldb) po almondImage
error: Error in auto-import:
Failed to load linked library swiftQuartzCore of module TrailMixKit - errors:
Looking for "#rpath/libswiftQuartzCore.dylib", error: not a string object
Here are the first few lines of my file (including imports):
//
// TrailMixIngredientImageView.swift
// Trailmix
import UIKit
import QuartzCore
If I set a breakpoint while running the app in the simulator, the po command works without error.
Can't add comment but did you add the framework for QuartzCore?