Post

Replies

Boosts

Views

Activity

Reply to iOS 14 vs iOS 15 - Are there changes in how table views adjust their scroll view offsets?
There are many posts here which indicate there were changes (poorly documented it seems). May be some solution described here could be useful in your case: https://developer.apple.com/forums/thread/683980  ios 15 for the Plain table view style they add a Section header padding by default, I wish it was a checkbox or something so we dont have to have it (especially by default) since alot of us are using custom section headers, BUT they did add a function to manually set it in your viewDidLoad      if (@available(iOS 15.0, *)) {        [self.tableView setSectionHeaderTopPadding:0.0f];      } this should remove the padding or that "gap" you are seeing.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to is the base model M1 iMac enough?
I don't see 8 core vs 7 as a must. For the external SSD, check carefully: it is a bit tricky. https://stackoverflow.com/questions/59159232/can-i-install-xcode-on-an-external-hard-drive-along-with-the-iphone-simulator-ap run xcode by itself to reduce ram usage What do you mean ? run alone ? Take care, you will have Mail open, Safari or other running, may need to have faceTime during development to contact other partner, a Text Editor to prepare some doc, an image editor to draw or modify some image… RAM use on M1 is much optimised, so maybe 8 GB are enough. But if you want to be future proof, 16GB is much better. And remember, on M1, RAM cannot be increased, it is built in the chip.
Oct ’21
Reply to In-House app after update to iOS15: App need to be updated
That's apparently a frequent problem. Someone seems to have found a solution here, at the end of this post: https://developer.apple.com/forums/thread/682067 found the same issue with multiple enterprise apps once the devices were upgraded to iOS 15, specifically those apps built with manual signing in XCode. This was resolved with the following different approaches. Solution 1 : We got rid of this by simply auto signing in XCode.  Solution 2 : By using the latest code signature format. Step 1 : Add the flag --generate-entitlement-der under the  Build Settings >> Other Code Sign Flags in XCode Step 2 : if applicable : % codesign -s "Your Codesign Identity" -f --preserve-metadata /path/to/YOURAPP.app , follow steps from        h ttps://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format  Step 3 : Copy YOUR_APPLICATION.app into a different directory : XCode>Windows>Organizer>Right Click your project and show it in finder > Right Click on the archived project and Show Packaged Contents > Products > Applications > YOURAPP.app  Step 4 : Compress it as YOURAPP.ipa (Don't use XCode's Distribute option) Step 5 : Distribute this app either through OTA or side load or through any enterprise store you might be using.  Solution 3 : Update your mac to Big Sur and rebuild the App with XCode 13.x You could try if any works for you.
Oct ’21
Reply to Couldn't parse json file as array
Is it this part ? Step 3 Add landmark as a stored property of LandmarkRow. When you add the landmark property, the preview stops working, because the LandmarkRow type needs a landmark instance during initialization. Then did you do this for step 4 ? To fix the preview, you’ll need to modify the preview provider. Step 4 In the previews static property of LandmarkRow_Previews, add the landmark parameter to the LandmarkRow initializer, specifying the first element of the landmarks array. The preview displays the text, “Hello, World!”.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to the compiler that produced it, 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)’, may have used features that aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
@jon-iproov we had expected that our framework would continue to be both forwards and backwards compatible as it has been until now. Unfortunately, that was a wrong expectation. Where did you get it ? It happened to work "by chance", because nothing was changed that could cause problem. But the last release had more changed.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to Couldn't parse json file as array
You should have somewhere: final class ModelData: ObservableObject { @Published var landmarks: [Landmark] = load("landmarkData.json") // Donc T est [Landmark] } func load<T: Decodable>(_ filename: String) -> T { let data: Data guard let file = Bundle.main.url(forResource: filename, withExtension: nil) else { fatalError("Couldn't find \(filename) in main Bundle") } do { data = try Data(contentsOf: file) } catch { fatalError("Couldn't load \(filename) in main Bundle:\n\(error)") } do { let decoder = JSONDecoder() return try decoder.decode(T.self, from: data) } catch { fatalError("Couldn't parse \(filename) as \(T.self):\n\(error)") } } Your exact message is : Couldn't parse landmarkData.json as Array You should have another line describing the error: please post it. So you probably have a problem in the landmarkData.json file. Could you attach this file as well ? Here is what it should be: landmarkData.json
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Scroll View with text and img inside
I would put all the objects Label, Image View, other Label inside a Container View, and define their constraints relative to this container view. As for the constraints, here is what I do for UIKit, it should be easily adapted to Cocoa: Create a ScrollView (as you did) Define its dimensions by constraints relating to the Safe area leading = 0 trailing = 0 top = maybe non zero if you scroll a part of the screen bottom = 35 (here to leave room for some buttons below) you can keep the content layout and frame layout ON Create a Container View (this is the Content View, named View here) Place it inside the scrollView (appears inside Scroll in the object hierarchy) Define the constraints with respect to the scrollView (Superview) leading = 0 trailing = 0 equalWidth with Scroll: we don't want to scroll horizontally top = 0 bottom = 0 Above all, do NOT make equal height with Scroll: there would be no more vertical scroll Define the dimension constraints of the ContentView to correspond to the complete content above which we will scroll (here the 4 items and the 3 switches) height = 262 width has been set equal to the width of the scrollView Note: this is necessary to eliminate red warnings from IB Place objects in the ContentView for each, define the constraints in relation to the ContentView. Don't hesitate to ask if something unclear.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to Xcode 13 typing is delayed / really slow
Two things I would try first: Do a Clean Build Folder Look at Issues navigator (on the left panel) and see if you've got any warning to update to new settings. If so, do it.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to iOS 14 vs iOS 15 - Are there changes in how table views adjust their scroll view offsets?
There are many posts here which indicate there were changes (poorly documented it seems). May be some solution described here could be useful in your case: https://developer.apple.com/forums/thread/683980  ios 15 for the Plain table view style they add a Section header padding by default, I wish it was a checkbox or something so we dont have to have it (especially by default) since alot of us are using custom section headers, BUT they did add a function to manually set it in your viewDidLoad      if (@available(iOS 15.0, *)) {        [self.tableView setSectionHeaderTopPadding:0.0f];      } this should remove the padding or that "gap" you are seeing.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to is the base model M1 iMac enough?
256 GB storage is really not enough. IMO, you would need at least 512 GB or even 1 TB. 8GB RAM is small, but M1 has optimized RAM use, so it is probably less critical. But I would recommend 16 GB. Xcode is really hungry.
Replies
Boosts
Views
Activity
Oct ’21
Reply to is the base model M1 iMac enough?
I don't see 8 core vs 7 as a must. For the external SSD, check carefully: it is a bit tricky. https://stackoverflow.com/questions/59159232/can-i-install-xcode-on-an-external-hard-drive-along-with-the-iphone-simulator-ap run xcode by itself to reduce ram usage What do you mean ? run alone ? Take care, you will have Mail open, Safari or other running, may need to have faceTime during development to contact other partner, a Text Editor to prepare some doc, an image editor to draw or modify some image… RAM use on M1 is much optimised, so maybe 8 GB are enough. But if you want to be future proof, 16GB is much better. And remember, on M1, RAM cannot be increased, it is built in the chip.
Replies
Boosts
Views
Activity
Oct ’21
Reply to In-House app after update to iOS15: App need to be updated
That's apparently a frequent problem. Someone seems to have found a solution here, at the end of this post: https://developer.apple.com/forums/thread/682067 found the same issue with multiple enterprise apps once the devices were upgraded to iOS 15, specifically those apps built with manual signing in XCode. This was resolved with the following different approaches. Solution 1 : We got rid of this by simply auto signing in XCode.  Solution 2 : By using the latest code signature format. Step 1 : Add the flag --generate-entitlement-der under the  Build Settings >> Other Code Sign Flags in XCode Step 2 : if applicable : % codesign -s "Your Codesign Identity" -f --preserve-metadata /path/to/YOURAPP.app , follow steps from        h ttps://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format  Step 3 : Copy YOUR_APPLICATION.app into a different directory : XCode>Windows>Organizer>Right Click your project and show it in finder > Right Click on the archived project and Show Packaged Contents > Products > Applications > YOURAPP.app  Step 4 : Compress it as YOURAPP.ipa (Don't use XCode's Distribute option) Step 5 : Distribute this app either through OTA or side load or through any enterprise store you might be using.  Solution 3 : Update your mac to Big Sur and rebuild the App with XCode 13.x You could try if any works for you.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Couldn't parse json file as array
Is it this part ? Step 3 Add landmark as a stored property of LandmarkRow. When you add the landmark property, the preview stops working, because the LandmarkRow type needs a landmark instance during initialization. Then did you do this for step 4 ? To fix the preview, you’ll need to modify the preview provider. Step 4 In the previews static property of LandmarkRow_Previews, add the landmark parameter to the LandmarkRow initializer, specifying the first element of the landmarks array. The preview displays the text, “Hello, World!”.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Lost Source Code
All you can get are screen shots from Appstore. But you should also keep your existing app on your device and make screen shots of anything you can. That will help you rebuild.
Replies
Boosts
Views
Activity
Oct ’21
Reply to the compiler that produced it, 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)’, may have used features that aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
@jon-iproov we had expected that our framework would continue to be both forwards and backwards compatible as it has been until now. Unfortunately, that was a wrong expectation. Where did you get it ? It happened to work "by chance", because nothing was changed that could cause problem. But the last release had more changed.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Anyway I could disable camera access from an app?
I don't really need camera access requirement for my app.       So how is it there is such camera code inside ? Either you need this code in the app, then you have to create the info.plist entry, or remove any code dealing with camera.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Game Crashes After Playing For A While
This is not a question for the forum, as roblox is not a game you developed. Ask directly to the company which sells the game if you cannot upgrade your Mac.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to How to implement isUserInteractionEnabled
You can also enable interaction directly in Interface Builder, with the Attributes Inspector.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Couldn't parse json file as array
You should have somewhere: final class ModelData: ObservableObject { @Published var landmarks: [Landmark] = load("landmarkData.json") // Donc T est [Landmark] } func load<T: Decodable>(_ filename: String) -> T { let data: Data guard let file = Bundle.main.url(forResource: filename, withExtension: nil) else { fatalError("Couldn't find \(filename) in main Bundle") } do { data = try Data(contentsOf: file) } catch { fatalError("Couldn't load \(filename) in main Bundle:\n\(error)") } do { let decoder = JSONDecoder() return try decoder.decode(T.self, from: data) } catch { fatalError("Couldn't parse \(filename) as \(T.self):\n\(error)") } } Your exact message is : Couldn't parse landmarkData.json as Array You should have another line describing the error: please post it. So you probably have a problem in the landmarkData.json file. Could you attach this file as well ? Here is what it should be: landmarkData.json
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Nib file not showing up in Xcode 13.0 interface builder
Sorry for this basic question: are you sure storyboard is not just scrolled off view ? select storyboard panel show Minimap: Editor > Minimap menu item. Does it occur on a new project as well ? Is it since you updated to Xcode 13 ? When you look at issues Navigator (left panel), do you get error messages ?
Replies
Boosts
Views
Activity
Oct ’21
Reply to BIGSUR STUCK INSTALLING
You need to be really patient. Installation can take a long time and progress bars are not always very responsive. I would not interrupt the boot before a few more hours.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Scroll View with text and img inside
I would put all the objects Label, Image View, other Label inside a Container View, and define their constraints relative to this container view. As for the constraints, here is what I do for UIKit, it should be easily adapted to Cocoa: Create a ScrollView (as you did) Define its dimensions by constraints relating to the Safe area leading = 0 trailing = 0 top = maybe non zero if you scroll a part of the screen bottom = 35 (here to leave room for some buttons below) you can keep the content layout and frame layout ON Create a Container View (this is the Content View, named View here) Place it inside the scrollView (appears inside Scroll in the object hierarchy) Define the constraints with respect to the scrollView (Superview) leading = 0 trailing = 0 equalWidth with Scroll: we don't want to scroll horizontally top = 0 bottom = 0 Above all, do NOT make equal height with Scroll: there would be no more vertical scroll Define the dimension constraints of the ContentView to correspond to the complete content above which we will scroll (here the 4 items and the 3 switches) height = 262 width has been set equal to the width of the scrollView Note: this is necessary to eliminate red warnings from IB Place objects in the ContentView for each, define the constraints in relation to the ContentView. Don't hesitate to ask if something unclear.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21