Post

Replies

Boosts

Views

Activity

Convert AWS amplify List to Array
I am using aws amplify and it returns all of its results into models and their type is something like List. But I would like them in standard swift arrays so I can use all the functionality like .first and such. How can this be done easily? My error: Cannot convert value of type 'List?' to expected argument type '[ResourceSubCategory]' Thank you!
2
0
689
Aug ’23
Delegate from anywhere?
I have a view controller called new student. When a new student is saved, the dataprovider sends the data onto the apiservice and the new student has items uploaded. In the api service file there is a progress of the upload process. How can I broadcast that progress from the apiservice so that the new student class can listen for it without using delegates?
1
0
390
May ’23
UIButton(configuration:... Does not work
I'm trying to use the new uibutton configuration and it doesn't receive touches. What am I missing? Adding other buttons the "old fashioned" way work just fine. var configuration = UIButton.Configuration.filled() configuration.buttonSize = .large configuration.title = "Swift" configuration.image = UIImage(systemName: "swift") configuration.imagePlacement = .trailing configuration.titlePadding = 10 configuration.imagePadding = 10 configuration.contentInsets = NSDirectionalEdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10) let tempButton = UIButton(configuration: configuration) tempButton.addAction(UIAction(handler: { action in print("new touched") }), for: .touchUpInside) self.view.addSubview(tempButton)
2
0
2.5k
Apr ’23
Versioning breaks with cocoapods...
For years I have had a run script (below) that increments my builds for me. I recently switched to using coocapods for my sdk's. Now having the run script makes the build fail with error.line 3: $(CURRENT_PROJECT_VERSION) + 1: syntax error: operand expected (error token is "$(CURRENT_PROJECT_VERSION) + 1")Command PhaseScriptExecution failed with a nonzero exit codebuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") buildNumber=$(($buildNumber + 1)) /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"Thoughts?
5
1
2.7k
Apr ’22
M1 Mac and Xcode is garbage
I had to purchase an M1 mac a couple months ago to get me until I can afford the mac studio because my i7 custom 27" 5K was dying. After the most recent update of Xcode I have nearly a full second before each key typed displays. 25 years plus experience with computers. Tried everything to keep my memory from being used so much. 13.3.1 leaves me with roughly 60mb's free. Dog slow! I can't do anything! Anyone else have this issue?
2
0
1.2k
Apr ’22
Two Bezier Paths Intersection Point
I have two paths on two separate layers/views that intersect at only one point. I need to find the point of intersection. I've searched and can't seem to find how this is possibe.The light grey vertical line intersection point with the blue line graph. Both paths are UIBezierPaths. Is there a method to get a array of insection points? Which in my case would return one result?
3
0
3.4k
May ’21
Sign in with Apple for app group
I have a series of apps that use the same user database. With my Facebook and email/password logins this is easy to identify the same user. However, the sign in with Apple creates a different user_id for the same user across my group of apps. How do I allow the same user to login with the same user_id across the app group?
1
0
936
Mar ’21
Convert AWS amplify List to Array
I am using aws amplify and it returns all of its results into models and their type is something like List. But I would like them in standard swift arrays so I can use all the functionality like .first and such. How can this be done easily? My error: Cannot convert value of type 'List?' to expected argument type '[ResourceSubCategory]' Thank you!
Replies
2
Boosts
0
Views
689
Activity
Aug ’23
Delegate from anywhere?
I have a view controller called new student. When a new student is saved, the dataprovider sends the data onto the apiservice and the new student has items uploaded. In the api service file there is a progress of the upload process. How can I broadcast that progress from the apiservice so that the new student class can listen for it without using delegates?
Replies
1
Boosts
0
Views
390
Activity
May ’23
UIButton(configuration:... Does not work
I'm trying to use the new uibutton configuration and it doesn't receive touches. What am I missing? Adding other buttons the "old fashioned" way work just fine. var configuration = UIButton.Configuration.filled() configuration.buttonSize = .large configuration.title = "Swift" configuration.image = UIImage(systemName: "swift") configuration.imagePlacement = .trailing configuration.titlePadding = 10 configuration.imagePadding = 10 configuration.contentInsets = NSDirectionalEdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10) let tempButton = UIButton(configuration: configuration) tempButton.addAction(UIAction(handler: { action in print("new touched") }), for: .touchUpInside) self.view.addSubview(tempButton)
Replies
2
Boosts
0
Views
2.5k
Activity
Apr ’23
Versioning breaks with cocoapods...
For years I have had a run script (below) that increments my builds for me. I recently switched to using coocapods for my sdk's. Now having the run script makes the build fail with error.line 3: $(CURRENT_PROJECT_VERSION) + 1: syntax error: operand expected (error token is "$(CURRENT_PROJECT_VERSION) + 1")Command PhaseScriptExecution failed with a nonzero exit codebuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") buildNumber=$(($buildNumber + 1)) /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"Thoughts?
Replies
5
Boosts
1
Views
2.7k
Activity
Apr ’22
M1 Mac and Xcode is garbage
I had to purchase an M1 mac a couple months ago to get me until I can afford the mac studio because my i7 custom 27" 5K was dying. After the most recent update of Xcode I have nearly a full second before each key typed displays. 25 years plus experience with computers. Tried everything to keep my memory from being used so much. 13.3.1 leaves me with roughly 60mb's free. Dog slow! I can't do anything! Anyone else have this issue?
Replies
2
Boosts
0
Views
1.2k
Activity
Apr ’22
Two Bezier Paths Intersection Point
I have two paths on two separate layers/views that intersect at only one point. I need to find the point of intersection. I've searched and can't seem to find how this is possibe.The light grey vertical line intersection point with the blue line graph. Both paths are UIBezierPaths. Is there a method to get a array of insection points? Which in my case would return one result?
Replies
3
Boosts
0
Views
3.4k
Activity
May ’21
Sign in with Apple for app group
I have a series of apps that use the same user database. With my Facebook and email/password logins this is easy to identify the same user. However, the sign in with Apple creates a different user_id for the same user across my group of apps. How do I allow the same user to login with the same user_id across the app group?
Replies
1
Boosts
0
Views
936
Activity
Mar ’21